package com.ccys.db.vo.app.paymentDetails;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author：XLY
 * @Date：2024/2/4 0004
 */
@Data
public class CalculationCostVo {

    @JsonProperty("booking_id")
    private String bookingId;    //": "57ebd14e-43b4-4edc-97b1-326808f04f52",


    @JsonProperty("booking_code")
    private String bookingCode;    //": "54561538548315",


    private String currency;    //": "$",


    @JsonProperty("is_waive_consultation_fee")
    private boolean isWaiveConsultationFee;    //": true,


    @JsonProperty("is_waive_delivery_fee")
    private boolean isWaiveDeliveryFee;    //": false,


    @JsonProperty("is_waive_medication_fee")
    private boolean isWaiveMedicationFee;    //": true,


    @JsonProperty("waive_medication_fee")
    private BigDecimal waiveMedicationFee;    //": 0.0,


    @JsonProperty("is_waive_practice_fee")
    private boolean isWaivePracticeFee;    //": true,


    @JsonProperty("waive_consultation_fee")
    private BigDecimal waiveConsultationFee;    //": 0.0,


    @JsonProperty("total_cost_consulation")
    private BigDecimal totalCostConsulation;    //": 0.0,


    @JsonProperty("total_cost_consulation_after_discount")
    private BigDecimal totalCostConsulationAfterDiscount;    //": 0.0,


    @JsonProperty("is_waive_medical_service")
    private boolean isWaiveMedicalService;    //": true,


    @JsonProperty("waive_medical_service_fee")
    private BigDecimal waiveMedicalServiceFee;    //": 0.0,


    @JsonProperty("subtotal_cost_medical_service")
    private BigDecimal subtotalCostMedicalService;    //": 0.0,


    @JsonProperty("total_cost_prescription")
    private BigDecimal totalCostPrescription;    //": 0.0,


    @JsonProperty("delivery_fee")
    private BigDecimal deliveryFee;    //": 0.0,


    @JsonProperty("is_surcharge_fee")
    private boolean isSurchargeFee;    //": false,


    @JsonProperty("surcharge_fee")
    private BigDecimal surchargeFee;    //": 0.0,


    @JsonProperty("practice_fee")
    private BigDecimal practiceFee;    //": 0.0,


    @JsonProperty("grand_total")
    private BigDecimal grandTotal;    //": 0.0,


    @JsonProperty("allow_promo_code")
    private boolean allowPromoCode;    //": false,

    private TaxVo tax;


    @JsonIgnore
    private BigDecimal taxRate;

    @JsonProperty("grand_total_payment")
    private BigDecimal grandTotalPayment;   //": 0.0,

    @JsonProperty("patient_receipt_label")
    private String patientReceiptLabel;   //": null,

    @JsonProperty("is_profile_updated")
    private boolean isProfileUpdated;   //": false,

    @JsonProperty("addition_meds_price")
    private BigDecimal additionMedsPrice;   //": 0.0,

    @JsonProperty("delivery_type")
    private String deliveryType;   //": "Express",

    @JsonProperty("delivery_address")
    private String deliveryAddress;   //": null,

    private String pharmacy;   //": null,

    private String corporate;   //": null,

    private String subscription;   //": null,

    // TODO: 2024/2/4 0004 List<Object> 都是不知道具体结构的字段
    private List<Object> prescription;   //": [],

    @JsonProperty("aia_identifier_checked")
    private boolean aiaIdentifierChecked;   //": true,

    @JsonProperty("deeplink_detai")
    private String deeplinkDetai;   //": null,

    @JsonProperty("profile_type_id")
    private String profileTypeId;   //": 2,

    @JsonProperty("aia_corporate")
    private AiaCorporateVo aiaCorporate;

    @JsonProperty("bin_discount_expired")
    private boolean binDiscountExpired;   //": false,

    @JsonProperty("bin_expiration_message")
    private String binExpirationMessage;   //": "",

    @JsonProperty("medical_service")
    private List<Object> medicalService;   //": [],

    @JsonProperty("package_prescription")
    private List<Object> packagePrescription;   //": [],

    @JsonProperty("package_medical_service")
    private List<Object> packageMedicalService;   //": [],

    @JsonProperty("cdmp_package")
    private String cdmpPackage;   //": null,

    @JsonProperty("subtotal_cost_package_prescription")
    private BigDecimal subtotalCostPackagePrescription;   //": 0.0,

    @JsonProperty("subtotal_cost_package_medical_service")
    private BigDecimal subtotalCostPackageMedicalService;   //": 0.0,

    @JsonProperty("service_bin_total_discount_amount")
    private BigDecimal serviceBinTotalDiscountAmount;   //": 0.0,

    @JsonProperty("medical_service_type")
    private MedicalServiceTypeVo medicalServiceType;

    @JsonIgnore
    private boolean showInBill;

    @JsonIgnore
    private BigDecimal serviceTypeFee;


    @Data
    public static class TaxVo{
        private BigDecimal amount;

        private String type;

        private BigDecimal fee;
    }


    @Data
    public static class AiaCorporateVo{
        @JsonProperty("waive_consult_charge")
        private boolean waiveConsultCharge;   //": false,

        @JsonProperty("waive_medication_charge")
        private boolean waiveMedicationCharge;   //": false,

        @JsonProperty("waive_practice_charge")
        private boolean waivePracticeCharge;   //": false,

        @JsonProperty("waive_delivery_charge")
        private boolean waiveDeliveryCharge;   //": false,

        @JsonProperty("subscription_profile_name")
        private String subscriptionProfileName;   //": "",

        @JsonProperty("aia_profile_name")
        private String aiaProfileName;   //": "ys email matching",

        @JsonProperty("corporate_discount_name")
        private String corporateDiscountName;   //": "",

        @JsonProperty("co_pay")
        private String coPay;   //": "",


        private String excess;   //": ""


    }

    @Data
    public static class MedicalServiceTypeVo{

        @JsonProperty("show_in_bill")
        private boolean showInBill;

        private BigDecimal price;

        @JsonProperty("service_type_name")
        private String serviceTypeName;
    }



}
